package com.bjpowernode.dataservice.mapper;

import com.bjpowernode.api.model.IncomeRecord;
import com.bjpowernode.api.vo.IncomeInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IncomeRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(IncomeRecord record);

    int insertSelective(IncomeRecord record);

    IncomeRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(IncomeRecord record);

    int updateByPrimaryKey(IncomeRecord record);

    //查询用户最近收益记录
    List<IncomeInfo> selectByUserId(@Param("userId") Integer userId, @Param("offset") int offset, @Param("rows") Integer rows);

    /**
     * 到期的收益计划记录
     * @return
     */
    List<IncomeRecord> selectExpireIncomePlan();


}